<template>
    <view class="container">
    <view class="tab">
            <u-tabs :list="list1" @click="click" :current="current" scrollable="false"></u-tabs>
        </view>
        
        <swiper class="swiper-content" :current="current" @change="swiperChange">
            <!-- 转子查询 -->
            <swiper-item>
                <view class="swiper-item">
                    <view class="filter-header">
                        <u-search 
                            placeholder="请输入转子型号"
                            v-model="rotorKeyword.model"
                            :showAction="true"
                            actionText="筛选"
                            @search="searchRotor"
                            @custom="searchRotor"
                            @clickAction="openRotorDrawer"
                        ></u-search>
                        <view class="filter-icon" @click="toggleRotorAdvancedSearch">
                            <u-icon :name="showRotorAdvancedSearch ? 'arrow-up' : 'arrow-down'" size="20"></u-icon>
                        </view>
                    </view>
                    
                    <!-- 高级搜索区域 - 转子 -->
                    <view class="advanced-search-box" v-show="showRotorAdvancedSearch">
                        <view class="search-row">
                            <view class="search-item">
                                <text class="label">芯粗:</text>
                                <u-input v-model="rotorKeyword.coreDiameter" placeholder="铁芯粗" border="surround" clearable></u-input>
                            </view>
                            <view class="search-item">
                                <text class="label">总长:</text>
                                <u-input v-model="rotorKeyword.totalLength" placeholder="总长" border="surround" clearable></u-input>
                            </view>
                        </view>
                        <view class="search-row">
                            <view class="search-item">
                                <text class="label">轴距:</text>
                                <u-input v-model="rotorKeyword.bearingDistance" placeholder="轴承距离" border="surround" clearable></u-input>
                            </view>
                            <view class="search-item">
                                <text class="label">前轴:</text>
                                <u-input v-model="rotorKeyword.frontBearing" placeholder="前轴承位" border="surround" clearable></u-input>
                            </view>
                        </view>
                         <view class="search-row">
                            <view class="search-item">
                                <text class="label">后轴:</text>
                                <u-input v-model="rotorKeyword.rearBearing" placeholder="后轴承位" border="surround" clearable></u-input>
                            </view>
                             <view class="search-item"></view> <!-- 占位 -->
                        </view>
                        <view class="search-btn-group">
                            <u-button type="info" size="small" @click="resetRotorAdvancedSearch">重置</u-button>
                            <u-button type="primary" size="small" @click="searchRotor">查询</u-button>
                        </view>
                    </view>
                    
                    <view class="content-box">
                        <view v-if="rotorList.length > 0">
                            <view class="item" v-for="(item, index) in rotorList" :key="index" @click="viewRotorDetail(item)">
                                <view class="item-title">{{item.model || '暂无型号'}}</view>
                                <view class="item-desc">品牌：{{item.brand || '暂无品牌'}}</view>
                                <view class="item-desc">规格：芯粗:{{item.coreDiameter||'0'}}  总长:{{item.totalLength||'0'}}  轴距:{{item.bearingDistance||'0'}}  前轴:{{item.frontBearing||'0'}}  后轴:{{item.rearBearing||'0'}}
                                </view>
                                <view class="item-arrow">
                                    <u-icon name="arrow-right" color="#c0c4cc" size="28"></u-icon>
                                </view>
                            </view>
                            <!-- 加载更多 -->
                            <view class="load-more" v-if="rotorHasMore">
                                <u-loadmore :status="rotorLoadStatus" @loadmore="loadMoreRotor"></u-loadmore>
                            </view>
                        </view>
                        <view v-else class="empty-data">
                            <u-empty mode="data" text="暂无数据"></u-empty>
                        </view>
                    </view>
                    
                    <!-- 筛选条件标签显示 -->
                    <view class="filter-tags" v-if="hasRotorFilter || hasRotorAdvancedFilter">
                        <scroll-view scroll-x class="filter-tags-scroll">
                            <!-- drawer filters -->
                            <view class="filter-tag" v-if="rotorKeyword.brand">
                                品牌: {{rotorKeyword.brand}}
                                <text class="tag-close" @click="clearRotorFilter('brand')">×</text>
                            </view>
                            <view class="filter-tag" v-if="rotorKeyword.spec">
                                规格: {{rotorKeyword.spec}}
                                <text class="tag-close" @click="clearRotorFilter('spec')">×</text>
                            </view>
                            <view class="filter-tag" v-if="rotorKeyword.stockStatus">
                                库存: {{rotorKeyword.stockStatus === '1' ? '有库存' : '无库存'}}
                                <text class="tag-close" @click="clearRotorFilter('stockStatus')">×</text>
                            </view>
                            <view class="filter-tag" v-if="rotorKeyword.minPrice || rotorKeyword.maxPrice">
                                价格: {{rotorKeyword.minPrice || '0'}}~{{rotorKeyword.maxPrice || '不限'}}
                                <text class="tag-close" @click="clearRotorFilter('price')">×</text>
                            </view>
                            <!-- advanced filters -->
                            <view class="filter-tag" v-if="rotorKeyword.coreDiameter">
                                芯粗: {{rotorKeyword.coreDiameter}}
                                <text class="tag-close" @click="clearRotorAdvancedFilter('coreDiameter')">×</text>
                            </view>
                            <view class="filter-tag" v-if="rotorKeyword.totalLength">
                                总长: {{rotorKeyword.totalLength}}
                                <text class="tag-close" @click="clearRotorAdvancedFilter('totalLength')">×</text>
                            </view>
                            <view class="filter-tag" v-if="rotorKeyword.bearingDistance">
                                轴距: {{rotorKeyword.bearingDistance}}
                                <text class="tag-close" @click="clearRotorAdvancedFilter('bearingDistance')">×</text>
                            </view>
                            <view class="filter-tag" v-if="rotorKeyword.frontBearing">
                                前轴: {{rotorKeyword.frontBearing}}
                                <text class="tag-close" @click="clearRotorAdvancedFilter('frontBearing')">×</text>
                            </view>
                             <view class="filter-tag" v-if="rotorKeyword.rearBearing">
                                后轴: {{rotorKeyword.rearBearing}}
                                <text class="tag-close" @click="clearRotorAdvancedFilter('rearBearing')">×</text>
                            </view>
                            <view class="clear-all" v-if="hasRotorFilter || hasRotorAdvancedFilter" @click="clearRotorSearch">清除全部</view>
                        </scroll-view>
                    </view>
                    
                    <!-- 悬浮添加按钮 -->
                    <view class="fab-btn" @click="addRotor">
                        <u-icon name="plus" color="#fff" size="24"></u-icon>
                    </view>
                    
                    <!-- 右侧抽屉筛选面板 -->
                    <u-popup :show="rotorDrawerVisible" mode="right" @close="closeRotorDrawer" width="70%" :mask="true" :maskCloseAble="true">
                        <view class="drawer-container">
                            <view class="drawer-header">
                                <text class="drawer-title">转子筛选</text>
                                <view class="drawer-close" @click="closeRotorDrawer">
                                    <u-icon name="close" size="18"></u-icon>
                                </view>
                            </view>
                            
                            <scroll-view scroll-y class="drawer-content">
                                <view class="filter-section">
                                    <view class="filter-title">基本信息</view>
                                    
                                    <view class="filter-item">
                                        <view class="filter-label">型号</view>
                                        <u-input
                                            v-model="rotorKeywordTemp.model"
                                            placeholder="请输入转子型号"
                                            border="surround"
                                        ></u-input>
                                    </view>
                                    
                                    <view class="filter-item">
                                        <view class="filter-label">品牌</view>
                                        <u-input
                                            v-model="rotorKeywordTemp.brand"
                                            placeholder="请输入品牌"
                                            border="surround"
                                        ></u-input>
                                    </view>
                                    
                                    <view class="filter-item">
                                        <view class="filter-label">规格</view>
                                        <u-input
                                            v-model="rotorKeywordTemp.spec"
                                            placeholder="请输入规格"
                                            border="surround"
                                        ></u-input>
                                    </view>
                                </view>
                                
                                <view class="filter-section">
                                    <view class="filter-title">库存信息</view>
                                    
                                    <view class="filter-item">
                                        <view class="filter-label">库存状态</view>
                                        <u-radio-group v-model="rotorKeywordTemp.stockStatus">
                                            <u-radio label="全部" name=""></u-radio>
                                            <u-radio label="有库存" name="1"></u-radio>
                                            <u-radio label="无库存" name="0"></u-radio>
                                        </u-radio-group>
                                    </view>
                                </view>
                                
                                <view class="filter-section">
                                    <view class="filter-title">价格范围</view>
                                    
                                    <view class="filter-item">
                                        <view class="price-range">
                                            <u-input
                                                v-model="rotorKeywordTemp.minPrice"
                                                placeholder="最低价"
                                                border="surround"
                                                type="number"
                                            ></u-input>
                                            <text class="price-divider">-</text>
                                            <u-input
                                                v-model="rotorKeywordTemp.maxPrice"
                                                placeholder="最高价"
                                                border="surround"
                                                type="number"
                                            ></u-input>
                                        </view>
                                    </view>
                                </view>
                            </scroll-view>
                            
                            <view class="drawer-footer">
                                <u-button type="info" text="重置" :plain="true" @click="resetRotorFilter"></u-button>
                                <u-button type="primary" text="确定" @click="confirmRotorFilter"></u-button>
                            </view>
                        </view>
                    </u-popup>
                </view>
            </swiper-item>
            
            <!-- 定子查询 -->
            <swiper-item>
                <view class="swiper-item">
                    <view class="filter-header">
                        <u-search 
                            placeholder="请输入定子型号"
                            v-model="statorKeyword.model"
                            :showAction="true"
                            actionText="筛选"
                            @search="searchStator"
                            @custom="searchStator"
                            @clickAction="openStatorDrawer"
                        ></u-search>
                        <view class="filter-icon" @click="toggleStatorAdvancedSearch">
                            <u-icon :name="showStatorAdvancedSearch ? 'arrow-up' : 'arrow-down'" size="20"></u-icon>
                        </view>
                    </view>
                    
                    <!-- 高级搜索区域 - 定子 -->
                    <view class="advanced-search-box" v-show="showStatorAdvancedSearch">
                        <view class="search-row">
                            <view class="search-item">
                                <text class="label">内径:</text>
                                <u-input v-model="statorKeyword.innerDiameter" placeholder="铁芯内径" border="surround" clearable></u-input>
                            </view>
                            <view class="search-item">
                                <text class="label">外径:</text>
                                <u-input v-model="statorKeyword.outerDiameter" placeholder="铁芯外径" border="surround" clearable></u-input>
                            </view>
                        </view>
                        <view class="search-row">
                             <view class="search-item">
                                <text class="label">高度:</text>
                                <u-input v-model="statorKeyword.height" placeholder="铁芯高度" border="surround" clearable></u-input>
                            </view>
                            <view class="search-item"></view> <!-- 占位 -->
                        </view>
                        <view class="search-btn-group">
                            <u-button type="info" size="small" @click="resetStatorAdvancedSearch">重置</u-button>
                            <u-button type="primary" size="small" @click="searchStator">查询</u-button>
                        </view>
                    </view>
                    
                    <view class="content-box">
                        <view v-if="statorList.length > 0">
                            <view class="item" v-for="(item, index) in statorList" :key="index" @click="viewStatorDetail(item)">
                                <view class="item-title">{{item.model || '暂无型号'}}</view>
                                <view class="item-desc">品牌：{{item.brand || '暂无品牌'}}</view>
                                <view class="item-desc">规格：内径:{{item.innerDiameter||'0'}}  外径:{{item.outerDiameter||'0'}}  高度:{{item.height||'0'}}</view>
                                <view class="item-arrow">
                                    <u-icon name="arrow-right" color="#c0c4cc" size="28"></u-icon>
                                </view>
                            </view>
                            <!-- 加载更多 -->
                            <view class="load-more" v-if="statorHasMore">
                                <u-loadmore :status="statorLoadStatus" @loadmore="loadMoreStator"></u-loadmore>
                            </view>
                        </view>
                        <view v-else class="empty-data">
                            <u-empty mode="data" text="暂无数据"></u-empty>
                        </view>
                    </view>
                    
                    <!-- 筛选条件标签显示 -->
                    <view class="filter-tags" v-if="hasStatorFilter || hasStatorAdvancedFilter">
                        <scroll-view scroll-x class="filter-tags-scroll">
                            <!-- drawer filters -->
                             <view class="filter-tag" v-if="statorKeyword.brand">
                                品牌: {{statorKeyword.brand}}
                                <text class="tag-close" @click="clearStatorFilter('brand')">×</text>
                            </view>
                            <view class="filter-tag" v-if="statorKeyword.spec">
                                规格: {{statorKeyword.spec}}
                                <text class="tag-close" @click="clearStatorFilter('spec')">×</text>
                            </view>
                            <view class="filter-tag" v-if="statorKeyword.stockStatus">
                                库存: {{statorKeyword.stockStatus === '1' ? '有库存' : '无库存'}}
                                <text class="tag-close" @click="clearStatorFilter('stockStatus')">×</text>
                            </view>
                            <view class="filter-tag" v-if="statorKeyword.minPrice || statorKeyword.maxPrice">
                                价格: {{statorKeyword.minPrice || '0'}}~{{statorKeyword.maxPrice || '不限'}}
                                <text class="tag-close" @click="clearStatorFilter('price')">×</text>
                            </view>
                            <!-- advanced filters -->
                            <view class="filter-tag" v-if="statorKeyword.innerDiameter">
                                内径: {{statorKeyword.innerDiameter}}
                                <text class="tag-close" @click="clearStatorAdvancedFilter('innerDiameter')">×</text>
                            </view>
                            <view class="filter-tag" v-if="statorKeyword.outerDiameter">
                                外径: {{statorKeyword.outerDiameter}}
                                <text class="tag-close" @click="clearStatorAdvancedFilter('outerDiameter')">×</text>
                            </view>
                            <view class="filter-tag" v-if="statorKeyword.height">
                                高度: {{statorKeyword.height}}
                                <text class="tag-close" @click="clearStatorAdvancedFilter('height')">×</text>
                            </view>
                            <view class="clear-all" v-if="hasStatorFilter || hasStatorAdvancedFilter" @click="clearStatorSearch">清除全部</view>
                        </scroll-view>
                    </view>
                    
                    <!-- 悬浮添加按钮 -->
                    <view class="fab-btn" @click="addStator">
                        <u-icon name="plus" color="#fff" size="24"></u-icon>
                    </view>
                    
                    <!-- 右侧抽屉筛选面板 -->
                    <u-popup :show="statorDrawerVisible" mode="right" @close="closeStatorDrawer" width="70%" :mask="true" :maskCloseAble="true">
                        <view class="drawer-container">
                            <view class="drawer-header">
                                <text class="drawer-title">定子筛选</text>
                                <view class="drawer-close" @click="closeStatorDrawer">
                                    <u-icon name="close" size="18"></u-icon>
                                </view>
                            </view>
                            
                            <scroll-view scroll-y class="drawer-content">
                                <view class="filter-section">
                                    <view class="filter-title">基本信息</view>
                                    
                                    <view class="filter-item">
                                        <view class="filter-label">型号</view>
                                        <u-input
                                            v-model="statorKeywordTemp.model"
                                            placeholder="请输入定子型号"
                                            border="surround"
                                        ></u-input>
                                    </view>
                                    
                                    <view class="filter-item">
                                        <view class="filter-label">品牌</view>
                                        <u-input
                                            v-model="statorKeywordTemp.brand"
                                            placeholder="请输入品牌"
                                            border="surround"
                                        ></u-input>
                                    </view>
                                    
                                    <view class="filter-item">
                                        <view class="filter-label">规格</view>
                                        <u-input
                                            v-model="statorKeywordTemp.spec"
                                            placeholder="请输入规格"
                                            border="surround"
                                        ></u-input>
                                    </view>
                                </view>
                                
                                <view class="filter-section">
                                    <view class="filter-title">库存信息</view>
                                    
                                    <view class="filter-item">
                                        <view class="filter-label">库存状态</view>
                                        <u-radio-group v-model="statorKeywordTemp.stockStatus">
                                            <u-radio label="全部" name=""></u-radio>
                                            <u-radio label="有库存" name="1"></u-radio>
                                            <u-radio label="无库存" name="0"></u-radio>
                                        </u-radio-group>
                                    </view>
                                </view>
                                
                                <view class="filter-section">
                                    <view class="filter-title">价格范围</view>
                                    
                                    <view class="filter-item">
                                        <view class="price-range">
                                            <u-input
                                                v-model="statorKeywordTemp.minPrice"
                                                placeholder="最低价"
                                                border="surround"
                                                type="number"
                                            ></u-input>
                                            <text class="price-divider">-</text>
                                            <u-input
                                                v-model="statorKeywordTemp.maxPrice"
                                                placeholder="最高价"
                                                border="surround"
                                                type="number"
                                            ></u-input>
                                        </view>
                                    </view>
                                </view>
                            </scroll-view>
                            
                            <view class="drawer-footer">
                                <u-button type="info" text="重置" :plain="true" @click="resetStatorFilter"></u-button>
                                <u-button type="primary" text="确定" @click="confirmStatorFilter"></u-button>
                            </view>
                        </view>
                    </u-popup>
                </view>
            </swiper-item>
            
            <!-- 配件查询 -->
            <swiper-item>
                <view class="swiper-item">
                     <view class="filter-header">
                        <u-search 
                            placeholder="请输入配件名称或型号"
                            v-model="partsKeyword.name" 
                            :showAction="true"
                            actionText="筛选"
                            @search="searchParts" 
                            @custom="searchParts"
                            @clickAction="openPartsDrawer"
                        ></u-search>
                         <view class="filter-icon" @click="togglePartsAdvancedSearch">
                            <u-icon :name="showPartsAdvancedSearch ? 'arrow-up' : 'arrow-down'" size="20"></u-icon>
                        </view>
                    </view>
                    
                    <!-- 高级搜索区域 - 配件 -->
                    <view class="advanced-search-box" v-show="showPartsAdvancedSearch">
                        <view class="search-row">
                            <view class="search-item">
                                <text class="label">型号:</text>
                                <u-input v-model="partsKeyword.model" placeholder="配件型号" border="surround" clearable></u-input>
                            </view>
                             <view class="search-item"></view> <!-- 占位 -->
                        </view>
                       <view class="search-btn-group">
                            <u-button type="info" size="small" @click="resetPartsAdvancedSearch">重置</u-button>
                            <u-button type="primary" size="small" @click="searchParts">查询</u-button>
                        </view>
                    </view>
                    
                    <view class="content-box">
                        <view v-if="partsList.length > 0">
                            <view class="item" v-for="(item, index) in partsList" :key="index" @click="viewPartsDetail(item)">
                                <view class="item-title">{{item.name || '暂无名称'}}</view>
                                <view class="item-desc">型号：{{item.model || '暂无型号'}}</view>
                                <view class="item-desc">适用：{{item.applicable || '暂无适用范围'}}</view>
                                <view class="item-arrow">
                                    <u-icon name="arrow-right" color="#c0c4cc" size="28"></u-icon>
                                </view>
                            </view>
                            <!-- 加载更多 -->
                            <view class="load-more" v-if="partsHasMore">
                                <u-loadmore :status="partsLoadStatus" @loadmore="loadMoreParts"></u-loadmore>
                            </view>
                        </view>
                        <view v-else class="empty-data">
                            <u-empty mode="data" text="暂无数据"></u-empty>
                        </view>
                    </view>
                    
                    <!-- 筛选条件标签显示 -->
                    <view class="filter-tags" v-if="hasPartsFilter || hasPartsAdvancedFilter">
                         <scroll-view scroll-x class="filter-tags-scroll">
                            <!-- drawer filters -->
                             <view class="filter-tag" v-if="partsKeyword.applicable"> <!-- Model is now in advanced -->
                                适用: {{partsKeyword.applicable}}
                                <text class="tag-close" @click="clearPartsFilter('applicable')">×</text>
                            </view>
                           <!-- ... existing drawer filter tags ... -->
                            <!-- advanced filters -->
                            <view class="filter-tag" v-if="partsKeyword.model">
                                型号: {{partsKeyword.model}}
                                <text class="tag-close" @click="clearPartsAdvancedFilter('model')">×</text>
                            </view>
                            <view class="clear-all" v-if="hasPartsFilter || hasPartsAdvancedFilter" @click="clearPartsSearch">清除全部</view>
                        </scroll-view>
                    </view>
                    
                   <!-- 新增：悬浮添加按钮 -->
                   <view class="fab-btn" @click="addParts">
                       <u-icon name="plus" color="#fff" size="24"></u-icon>
                   </view>
                    
                    <!-- 右侧抽屉筛选面板 -->
                    <u-popup :show="partsDrawerVisible" mode="right" @close="closePartsDrawer" width="70%" :mask="true" :maskCloseAble="true">
                        <view class="drawer-container">
                            <view class="drawer-header">
                                <text class="drawer-title">配件筛选</text>
                                <view class="drawer-close" @click="closePartsDrawer">
                                    <u-icon name="close" size="18"></u-icon>
                                </view>
                            </view>
                            
                            <scroll-view scroll-y class="drawer-content">
                                <view class="filter-section">
                                    <view class="filter-title">基本信息</view>
                                    
                                    <view class="filter-item">
                                        <view class="filter-label">名称</view>
                                        <u-input
                                            v-model="partsKeywordTemp.name"
                                            placeholder="请输入配件名称"
                                            border="surround"
                                        ></u-input>
                                    </view>
                                    
                                    <view class="filter-item">
                                        <view class="filter-label">型号</view>
                                        <u-input
                                            v-model="partsKeywordTemp.model"
                                            placeholder="请输入配件型号"
                                            border="surround"
                                        ></u-input>
                                    </view>
                                    
                                    <view class="filter-item">
                                        <view class="filter-label">适用范围</view>
                                        <u-input
                                            v-model="partsKeywordTemp.applicable"
                                            placeholder="请输入适用范围"
                                            border="surround"
                                        ></u-input>
                                    </view>
                                </view>
                                
                                <view class="filter-section">
                                    <view class="filter-title">库存信息</view>
                                    
                                    <view class="filter-item">
                                        <view class="filter-label">库存状态</view>
                                        <u-radio-group v-model="partsKeywordTemp.stockStatus">
                                            <u-radio label="全部" name=""></u-radio>
                                            <u-radio label="有库存" name="1"></u-radio>
                                            <u-radio label="无库存" name="0"></u-radio>
                                        </u-radio-group>
                                    </view>
                                </view>
                                
                                <view class="filter-section">
                                    <view class="filter-title">价格范围</view>
                                    
                                    <view class="filter-item">
                                        <view class="price-range">
                                            <u-input
                                                v-model="partsKeywordTemp.minPrice"
                                                placeholder="最低价"
                                                border="surround"
                                                type="number"
                                            ></u-input>
                                            <text class="price-divider">-</text>
                                            <u-input
                                                v-model="partsKeywordTemp.maxPrice"
                                                placeholder="最高价"
                                                border="surround"
                                                type="number"
                                            ></u-input>
                                        </view>
                                    </view>
                                </view>
                            </scroll-view>
                            
                            <view class="drawer-footer">
                                <u-button type="info" text="重置" :plain="true" @click="resetPartsFilter"></u-button>
                                <u-button type="primary" text="确定" @click="confirmPartsFilter"></u-button>
                            </view>
                        </view>
                    </u-popup>
                </view>
            </swiper-item>
        </swiper>
	</view>
</template>

<script>
	import api from '@/utils/api.js'
	
	export default {
		data() {
			return {
                current: 0,
                list1: [{
                    name: '转子查询',
                }, {
                    name: '定子查询',
                }, {
                    name: '配件查询'
                }],
                // 转子查询
                rotorKeyword: {
                    model: '',
                    brand: '',
                    spec: '',
                    stockStatus: '',
                    minPrice: '',
                    maxPrice: '',
                    coreDiameter: '',
                    totalLength: '',
                    bearingDistance: '',
                    frontBearing: '',
                    rearBearing: ''
                },
                rotorList: [],
                rotorPage: 1,
                rotorPageSize: 10,
                rotorTotal: 0,
                rotorHasMore: false,
                rotorLoadStatus: 'loadmore',
                showRotorAdvancedSearch: false,

                // 定子查询
                statorKeyword: {
                    model: '',
                    brand: '',
                    spec: '',
                    stockStatus: '',
                    minPrice: '',
                    maxPrice: '',
                    innerDiameter: '',
                    outerDiameter: '',
                    height: ''
                },
                statorList: [],
                statorPage: 1,
                statorPageSize: 10,
                statorTotal: 0,
                statorHasMore: false,
                statorLoadStatus: 'loadmore',
                showStatorAdvancedSearch: false,

                // 配件查询
                partsKeyword: {
                    name: '',
                    model: '',
                    applicable: '',
                    stockStatus: '',
                    minPrice: '',
                    maxPrice: ''
                },
                partsList: [],
                partsPage: 1,
                partsPageSize: 10,
                partsTotal: 0,
                partsHasMore: false,
                partsLoadStatus: 'loadmore',
                showPartsAdvancedSearch: false,

                // 临时筛选值
                rotorKeywordTemp: {},
                statorKeywordTemp: {},
                partsKeywordTemp: {},
                // 抽屉可见性
                rotorDrawerVisible: false,
                statorDrawerVisible: false,
                partsDrawerVisible: false
			}
		},
		computed: {
            // 是否有转子筛选条件
            hasRotorFilter() {
                return !!(this.rotorKeyword.brand || 
                       this.rotorKeyword.spec || 
                       this.rotorKeyword.stockStatus || 
                       this.rotorKeyword.minPrice || 
                       this.rotorKeyword.maxPrice);
            },
            // 是否有转子高级筛选条件
            hasRotorAdvancedFilter() {
                return !!(this.rotorKeyword.coreDiameter || this.rotorKeyword.totalLength || this.rotorKeyword.bearingDistance || this.rotorKeyword.frontBearing || this.rotorKeyword.rearBearing);
            },
            // 是否有定子筛选条件
            hasStatorFilter() {
                return !!(this.statorKeyword.brand || 
                       this.statorKeyword.spec || 
                       this.statorKeyword.stockStatus || 
                       this.statorKeyword.minPrice || 
                       this.statorKeyword.maxPrice);
            },
            // 是否有定子高级筛选条件
            hasStatorAdvancedFilter() {
                return !!(this.statorKeyword.innerDiameter || this.statorKeyword.outerDiameter || this.statorKeyword.height);
            },
            // 是否有配件筛选条件
            hasPartsFilter() {
                return !!(this.partsKeyword.applicable || 
                       this.partsKeyword.stockStatus || 
                       this.partsKeyword.minPrice || 
                       this.partsKeyword.maxPrice);
            },
            // 是否有配件高级筛选条件
            hasPartsAdvancedFilter() {
                return !!this.partsKeyword.model;
            }
        },
		onLoad(options) {
            if (options && options.tabIndex) {
                const targetIndex = parseInt(options.tabIndex, 10);
                if (!isNaN(targetIndex) && targetIndex >= 0 && targetIndex < this.list1.length) {
                    this.current = targetIndex;
                    console.log(`Stator page loaded, switched to tab index: ${targetIndex}`);
                }
            }
            this.loadInitialData();
        },
        onShow() {
            console.log('页面 onShow 触发，重新加载当前Tab数据');
            this.reloadCurrentList(); 
        },
        onUnload() {
            uni.$off('refreshRotorList');
            uni.$off('refreshStatorList');
            uni.$off('refreshPartsList');
		},
		methods: {
            loadInitialData() {
                this.resetRotor();
                this.resetStator();
                this.resetParts();
                this.fetchRotorList();
                this.fetchStatorList();
                this.fetchPartsList();
            },
            refreshRotorList() {
                console.log('收到刷新转子列表事件');
                if (this.current === 0) {
                    this.resetRotor();
                    this.fetchRotorList();
                }
            },
            refreshStatorList() {
                console.log('收到刷新定子列表事件');
                if (this.current === 1) {
                    this.resetStator();
                    this.fetchStatorList();
                }
            },
            refreshPartsList() {
                console.log('收到刷新配件列表事件');
                if (this.current === 2) {
                    this.resetParts();
                    this.fetchPartsList();
                }
            },
            
            reloadCurrentList() {
                this.showRotorAdvancedSearch = true;
                this.showStatorAdvancedSearch = true;
                this.showPartsAdvancedSearch = true;
                
                console.log(`重新加载Tab: ${this.current}`);
                
                if (this.current === 0) {
                    this.resetRotor();
                    this.fetchRotorList();
                } else if (this.current === 1) {
                    this.resetStator();
                    this.fetchStatorList();
                } else if (this.current === 2) {
                    this.resetParts();
                    this.fetchPartsList();
                }
            },
            
            click(item) {
                if (this.current === item.index) return;
                this.current = item.index;
                this.showRotorAdvancedSearch = false;
                this.showStatorAdvancedSearch = false;
                this.showPartsAdvancedSearch = false;
                this.closeRotorDrawer();
                this.closeStatorDrawer();
                this.closePartsDrawer();
                this.reloadCurrentList();
            },
            swiperChange(e) {
                if (this.current === e.detail.current) return;
                this.current = e.detail.current;
                this.showRotorAdvancedSearch = false;
                this.showStatorAdvancedSearch = false;
                this.showPartsAdvancedSearch = false;
                this.closeRotorDrawer();
                this.closeStatorDrawer();
                this.closePartsDrawer();
                this.reloadCurrentList();
            },
            
            toggleRotorAdvancedSearch() {
                this.showRotorAdvancedSearch = !this.showRotorAdvancedSearch;
            },
            resetRotorAdvancedSearch() {
                this.rotorKeyword.coreDiameter = '';
                this.rotorKeyword.totalLength = '';
                this.rotorKeyword.bearingDistance = '';
                this.rotorKeyword.frontBearing = '';
                this.rotorKeyword.rearBearing = '';
                this.searchRotor();
            },
            clearRotorAdvancedFilter(type) {
                if (['coreDiameter', 'totalLength', 'bearingDistance', 'frontBearing', 'rearBearing'].includes(type)) {
                    this.rotorKeyword[type] = '';
                    this.searchRotor();
                }
            },
            resetRotor() {
                this.rotorPage = 1;
                this.rotorList = [];
                this.rotorTotal = 0;
                this.rotorHasMore = false;
                this.rotorLoadStatus = 'loadmore';
            },
            clearRotorSearch() {
                this.rotorKeyword = {
                    model: '',
                    brand: '',
                    spec: '',
                    stockStatus: '',
                    minPrice: '',
                    maxPrice: '',
                    coreDiameter: '',
                    totalLength: '',
                    bearingDistance: '',
                    frontBearing: '',
                    rearBearing: ''
                };
                this.resetRotor();
                this.fetchRotorList();
            },
            searchRotor() {
                console.log('搜索转子', this.rotorKeyword);
                this.resetRotor();
                this.fetchRotorList();
            },
            fetchRotorList(replace = true) {
                uni.showLoading({ title: '加载中...' });
                
                const params = {
                    pageNum: this.rotorPage,
                    pageSize: this.rotorPageSize,
                    model: this.rotorKeyword.model,
                    brand: this.rotorKeyword.brand,
                    spec: this.rotorKeyword.spec,
                    coreDiameter: this.rotorKeyword.coreDiameter,
                    totalLength: this.rotorKeyword.totalLength,
                    bearingDistance: this.rotorKeyword.bearingDistance,
                    frontBearing: this.rotorKeyword.frontBearing,
                    rearBearing: this.rotorKeyword.rearBearing
                };
                
                if (this.rotorKeyword.stockStatus) {
                    params.stockStatus = this.rotorKeyword.stockStatus;
                }
                if (this.rotorKeyword.minPrice) {
                    params.minPrice = this.rotorKeyword.minPrice;
                }
                if (this.rotorKeyword.maxPrice) {
                    params.maxPrice = this.rotorKeyword.maxPrice;
                }
                
                console.log('请求参数:', params);
                
                api.listShaftspecifications(params).then(res => {
                    console.log('转子列表返回:', res);
                    uni.hideLoading();
                    
                    if (res && res.rows) {
                        if (replace) {
                            this.rotorList = res.rows;
                        } else {
                            this.rotorList = [...this.rotorList, ...res.rows];
                        }
                        this.rotorTotal = res.total;
                        
                        if (this.rotorList.length >= this.rotorTotal) {
                            this.rotorHasMore = false;
                            this.rotorLoadStatus = 'nomore';
                        } else {
                            this.rotorHasMore = true;
                            this.rotorLoadStatus = 'loadmore';
                        }
                    } else {
                        if (replace) {
                            this.rotorList = [];
                        }
                        this.rotorHasMore = false;
                        this.rotorLoadStatus = 'nomore';
                    }
                }).catch(err => {
                    console.error('转子列表请求失败:', err);
                    uni.hideLoading();
                    uni.showToast({ 
                        title: '加载失败', 
                        icon: 'none' 
                    });
                    this.rotorLoadStatus = 'loadmore';
                });
            },
            viewRotorDetail(item) {
                if (!item || !item.id) {
                    uni.showToast({ 
                        title: '数据异常，无法查看详情', 
                        icon: 'none'
                    });
                    return;
                }
                uni.navigateTo({
                    url: `/subPack/stator/rotor-detail?id=${item.id}`,
                    success: () => {
                        console.log('成功跳转到转子详情页');
                    },
                    fail: (err) => {
                        console.error('跳转失败:', err);
                        uni.showToast({
                            title: '跳转失败，请重试',
                            icon: 'none'
                        });
                    }
                });
            },
            addRotor() {
                uni.navigateTo({
                    url: '/subPack/stator/rotor-edit',
                    success: () => {
                        console.log('成功跳转到转子编辑页');
                    },
                    fail: (err) => {
                        console.error('跳转失败:', err);
                        uni.showToast({
                            title: '跳转失败，请重试',
                            icon: 'none'
                        });
                    }
                });
            },
            
            toggleStatorAdvancedSearch() {
                this.showStatorAdvancedSearch = !this.showStatorAdvancedSearch;
            },
            resetStatorAdvancedSearch() {
                this.statorKeyword.innerDiameter = '';
                this.statorKeyword.outerDiameter = '';
                this.statorKeyword.height = '';
                this.searchStator();
            },
            clearStatorAdvancedFilter(type) {
                if (['innerDiameter', 'outerDiameter', 'height'].includes(type)) {
                    this.statorKeyword[type] = '';
                    this.searchStator();
                }
            },
            resetStator() {
                this.statorPage = 1;
                this.statorList = [];
                this.statorTotal = 0;
                this.statorHasMore = false;
                this.statorLoadStatus = 'loadmore';
            },
            clearStatorSearch() {
                this.statorKeyword = {
                    model: '',
                    brand: '',
                    spec: '',
                    stockStatus: '',
                    minPrice: '',
                    maxPrice: '',
                    innerDiameter: '',
                    outerDiameter: '',
                    height: ''
                };
                this.resetStator();
                this.fetchStatorList();
            },
            searchStator() {
                console.log('搜索定子', this.statorKeyword);
                this.resetStator();
                this.fetchStatorList();
            },
            fetchStatorList(replace = true) {
                uni.showLoading({ title: '加载中...' });
                
                const params = {
                    pageNum: this.statorPage,
                    pageSize: this.statorPageSize,
                    model: this.statorKeyword.model,
                    brand: this.statorKeyword.brand,
                    spec: this.statorKeyword.spec,
                    innerDiameter: this.statorKeyword.innerDiameter,
                    outerDiameter: this.statorKeyword.outerDiameter,
                    height: this.statorKeyword.height
                };
                
                if (this.statorKeyword.stockStatus) {
                    params.stockStatus = this.statorKeyword.stockStatus;
                }
                if (this.statorKeyword.minPrice) {
                    params.minPrice = this.statorKeyword.minPrice;
                }
                if (this.statorKeyword.maxPrice) {
                    params.maxPrice = this.statorKeyword.maxPrice;
                }
                
                console.log('请求参数:', params);
                
                api.listCore(params).then(res => {
                    console.log('定子列表返回:', res);
                    uni.hideLoading();
                    
                    if (res && res.rows) {
                        if (replace) {
                            this.statorList = res.rows;
                        } else {
                            this.statorList = [...this.statorList, ...res.rows];
                        }
                        this.statorTotal = res.total;
                        
                        if (this.statorList.length >= this.statorTotal) {
                            this.statorHasMore = false;
                            this.statorLoadStatus = 'nomore';
                        } else {
                            this.statorHasMore = true;
                            this.statorLoadStatus = 'loadmore';
                        }
                    } else {
                        if (replace) {
                            this.statorList = [];
                        }
                        this.statorHasMore = false;
                        this.statorLoadStatus = 'nomore';
                    }
                }).catch(err => {
                    console.error('定子列表请求失败:', err);
                    uni.hideLoading();
                    uni.showToast({ 
                        title: '加载失败', 
                        icon: 'none' 
                    });
                    this.statorLoadStatus = 'loadmore';
                });
            },
            viewStatorDetail(item) {
                if (!item || !item.id) {
                    uni.showToast({ 
                        title: '数据异常，无法查看详情', 
                        icon: 'none'
                    });
                    return;
                }
                uni.navigateTo({
                    url: `/subPack/stator/stator-detail?id=${item.id}`,
                    success: () => {
                        console.log('成功跳转到定子详情页');
                    },
                    fail: (err) => {
                        console.error('跳转失败:', err);
                        uni.showToast({
                            title: '跳转失败，请重试',
                            icon: 'none'
                        });
                    }
                });
            },
            addStator() {
                uni.navigateTo({
                    url: '/subPack/stator/stator-edit',
                    success: () => {
                        console.log('成功跳转到定子编辑页');
                    },
                    fail: (err) => {
                        console.error('跳转失败:', err);
                        uni.showToast({
                            title: '跳转失败，请重试',
                            icon: 'none'
                        });
                    }
                });
            },
            
            togglePartsAdvancedSearch() {
                this.showPartsAdvancedSearch = !this.showPartsAdvancedSearch;
            },
            resetPartsAdvancedSearch() {
                this.partsKeyword.model = '';
                this.searchParts();
            },
            clearPartsAdvancedFilter(type) {
                if (type === 'model') {
                    this.partsKeyword.model = '';
                    this.searchParts();
                }
            },
            resetParts() {
                this.partsPage = 1;
                this.partsList = [];
                this.partsTotal = 0;
                this.partsHasMore = false;
                this.partsLoadStatus = 'loadmore';
            },
            clearPartsSearch() {
                this.partsKeyword = {
                    name: '',
                    model: '', 
                    applicable: '',
                    stockStatus: '',
                    minPrice: '',
                    maxPrice: ''
                };
                this.resetParts();
                this.fetchPartsList();
            },
            searchParts() {
                console.log('搜索配件', this.partsKeyword);
                this.resetParts();
                this.fetchPartsList();
            },
            fetchPartsList(replace = true) {
                uni.showLoading({ title: '加载中...' });
                
                const params = {
                    pageNum: this.partsPage,
                    pageSize: this.partsPageSize,
                    name: this.partsKeyword.name,
                    applicable: this.partsKeyword.applicable,
                    model: this.partsKeyword.model
                };
                
                if (this.partsKeyword.stockStatus) {
                    params.stockStatus = this.partsKeyword.stockStatus;
                }
                if (this.partsKeyword.minPrice) {
                    params.minPrice = this.partsKeyword.minPrice;
                }
                if (this.partsKeyword.maxPrice) {
                    params.maxPrice = this.partsKeyword.maxPrice;
                }
                
                console.log('请求参数:', params);
                
                api.listParts(params).then(res => {
                    console.log('配件列表返回:', res);
                    uni.hideLoading();
                    
                    if (res && res.rows) {
                        if (replace) {
                            this.partsList = res.rows;
                        } else {
                            this.partsList = [...this.partsList, ...res.rows];
                        }
                        this.partsTotal = res.total;
                        
                        if (this.partsList.length >= this.partsTotal) {
                            this.partsHasMore = false;
                            this.partsLoadStatus = 'nomore';
                        } else {
                            this.partsHasMore = true;
                            this.partsLoadStatus = 'loadmore';
                        }
                    } else {
                        if (replace) {
                            this.partsList = [];
                        }
                        this.partsHasMore = false;
                        this.partsLoadStatus = 'nomore';
                    }
                }).catch(err => {
                    console.error('配件列表请求失败:', err);
                    uni.hideLoading();
                    uni.showToast({ 
                        title: '加载失败', 
                        icon: 'none' 
                    });
                    this.partsLoadStatus = 'loadmore';
                });
            },
            viewPartsDetail(item) {
                if (!item || !item.id) {
                    uni.showToast({ 
                        title: '数据异常，无法查看详情', 
                        icon: 'none'
                    });
                    return;
                }
                uni.navigateTo({
                    url: `/subPack/stator/parts-detail?id=${item.id}`,
                    success: () => {
                        console.log('成功跳转到配件详情页');
                    },
                    fail: (err) => {
                        console.error('跳转失败:', err);
                        uni.showToast({
                            title: '跳转失败，请重试',
                            icon: 'none'
                        });
                    }
                });
            },
            addParts() {
                uni.navigateTo({
                    url: '/subPack/stator/parts-edit',
                    success: () => {
                        console.log('成功跳转到配件编辑页');
                    },
                    fail: (err) => {
                        console.error('跳转失败:', err);
                        uni.showToast({
                            title: '跳转失败，请重试',
                            icon: 'none'
                        });
                    }
                });
            },

            openRotorDrawer() {
                this.rotorKeywordTemp = JSON.parse(JSON.stringify(this.rotorKeyword));
                this.rotorDrawerVisible = true;
                console.log('打开转子筛选抽屉', this.rotorDrawerVisible);
            },
            closeRotorDrawer() {
                this.rotorDrawerVisible = false;
                console.log('关闭转子筛选抽屉', this.rotorDrawerVisible);
            },
            resetRotorFilter() {
                this.rotorKeywordTemp = {
                    model: '',
                    brand: '',
                    spec: '',
                    stockStatus: '',
                    minPrice: '',
                    maxPrice: '',
                    coreDiameter: '',
                    totalLength: '',
                    bearingDistance: '',
                    frontBearing: '',
                    rearBearing: ''
                };
                console.log('重置转子筛选条件', this.rotorKeywordTemp);
            },
            confirmRotorFilter() {
                this.rotorKeyword = { ...this.rotorKeywordTemp };
                this.resetRotorFilter();
                this.fetchRotorList();
                this.closeRotorDrawer();
            },
            clearRotorFilter(filterType) {
                if (filterType === 'brand') {
                    this.rotorKeyword.brand = '';
                } else if (filterType === 'spec') {
                    this.rotorKeyword.spec = '';
                } else if (filterType === 'stockStatus') {
                    this.rotorKeyword.stockStatus = '';
                } else if (filterType === 'price') {
                    this.rotorKeyword.minPrice = '';
                    this.rotorKeyword.maxPrice = '';
                }
                this.resetRotorFilter();
                this.fetchRotorList();
            },
            openStatorDrawer() {
                this.statorKeywordTemp = JSON.parse(JSON.stringify(this.statorKeyword));
                this.statorDrawerVisible = true;
                console.log('打开定子筛选抽屉', this.statorDrawerVisible);
            },
            closeStatorDrawer() {
                this.statorDrawerVisible = false;
                console.log('关闭定子筛选抽屉', this.statorDrawerVisible);
            },
            resetStatorFilter() {
                this.statorKeywordTemp = {
                    model: '',
                    brand: '',
                    spec: '',
                    stockStatus: '',
                    minPrice: '',
                    maxPrice: '',
                    innerDiameter: '',
                    outerDiameter: '',
                    height: ''
                };
                console.log('重置定子筛选条件', this.statorKeywordTemp);
            },
            confirmStatorFilter() {
                this.statorKeyword = { ...this.statorKeywordTemp };
                this.resetStatorFilter();
                this.fetchStatorList();
                this.closeStatorDrawer();
            },
            clearStatorFilter(filterType) {
                if (filterType === 'brand') {
                    this.statorKeyword.brand = '';
                } else if (filterType === 'spec') {
                    this.statorKeyword.spec = '';
                } else if (filterType === 'stockStatus') {
                    this.statorKeyword.stockStatus = '';
                } else if (filterType === 'price') {
                    this.statorKeyword.minPrice = '';
                    this.statorKeyword.maxPrice = '';
                }
                this.resetStatorFilter();
                this.fetchStatorList();
            },
            openPartsDrawer() {
                this.partsKeywordTemp = JSON.parse(JSON.stringify(this.partsKeyword));
                this.partsDrawerVisible = true;
                console.log('打开配件筛选抽屉', this.partsDrawerVisible);
            },
            closePartsDrawer() {
                this.partsDrawerVisible = false;
                console.log('关闭配件筛选抽屉', this.partsDrawerVisible);
            },
            resetPartsFilter() {
                this.partsKeywordTemp = {
                    name: '',
                    model: '',
                    applicable: '',
                    stockStatus: '',
                    minPrice: '',
                    maxPrice: ''
                };
                console.log('重置配件筛选条件', this.partsKeywordTemp);
            },
            confirmPartsFilter() {
                this.partsKeyword = { ...this.partsKeywordTemp };
                this.resetPartsFilter();
                this.fetchPartsList();
                this.closePartsDrawer();
            },
            clearPartsFilter(filterType) {
                if (filterType === 'applicable') {
                    this.partsKeyword.applicable = '';
                } else if (filterType === 'stockStatus') {
                    this.partsKeyword.stockStatus = '';
                } else if (filterType === 'price') {
                    this.partsKeyword.minPrice = '';
                    this.partsKeyword.maxPrice = '';
                }
                this.resetPartsFilter();
                this.fetchPartsList();
            }
		}
	}
</script>

<style lang="scss" scoped>
.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #f5f5f5;
}

.tab {
    display: flex;
    justify-content: center;
}

.swiper-content {
    flex: 1;
}

.swiper-item {
    height: 100%;
    padding: 20rpx;
    position: relative;
}

.filter-header {
    margin-bottom: 20rpx;
    display: flex;
    align-items: center;

    .u-search {
        flex: 1;
    }
}

.filter-icon {
    padding: 10rpx 15rpx;
    margin-left: 15rpx;
    background-color: #f0f0f0;
    border-radius: 8rpx;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;

    &:active {
        background-color: #e0e0e0;
    }
}

.advanced-search-box {
    background-color: #fff;
    border-radius: 10rpx;
    padding: 20rpx;
    margin-bottom: 20rpx;
    box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);

    .search-row {
        display: flex;
        margin-bottom: 15rpx;
        gap: 20rpx;

        &:last-child {
            margin-bottom: 0;
        }
    }

    .search-item {
        flex: 1;
        display: flex;
        align-items: center;

        .label {
            width: 100rpx;
            font-size: 24rpx;
            color: #666;
            text-align: right;
            margin-right: 10rpx;
        }
        
        .u-input {
            flex: 1;
        }
    }
    
    .search-btn-group {
        display: flex;
        justify-content: flex-end;
        gap: 20rpx;
        margin-top: 20rpx;
        padding-top: 15rpx;
        border-top: 1rpx solid #f0f0f0;
    }
}

.search-box {
    margin-bottom: 20rpx;
}

.content-box {
    height: calc(100% - 320rpx);
    overflow-y: auto;
}

.item {
    background-color: #fff;
    border-radius: 10rpx;
    padding: 20rpx;
    margin-bottom: 20rpx;
    box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
    position: relative;
}

.item-title {
    font-size: 28rpx;
    font-weight: bold;
    margin-bottom: 10rpx;
    color: #333;
}

.item-desc {
    font-size: 24rpx;
    color: #666;
    margin-bottom: 5rpx;
}
.item-desc-box{
    display: flex;
    flex-direction: column;
    gap: 5rpx;
}

.item-arrow {
    position: absolute;
    right: 20rpx;
    top: 50%;
    transform: translateY(-50%);
}

.empty-data {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400rpx;
}

.load-more {
    margin: 20rpx 0;
    text-align: center;
}

.fab-btn {
    position: fixed;
    right: 30rpx;
    bottom: 100rpx;
    width: 100rpx;
    height: 100rpx;
    background-color: #1989fa;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4rpx 16rpx rgba(25, 137, 250, 0.5);
    z-index: 10;
}

.filter-tags {
    margin-bottom: 20rpx;
    padding-bottom: 10rpx;
}

.filter-tags-scroll {
    white-space: nowrap;
    padding: 5rpx 0;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    background-color: #e8f4ff;
    border: 1rpx solid #d1e9ff;
    color: #1989fa;
    border-radius: 6rpx;
    padding: 8rpx 15rpx;
    margin-right: 15rpx;
    font-size: 22rpx;
}

.tag-close {
    margin-left: 10rpx;
    color: #909399;
    cursor: pointer;
    font-size: 24rpx;
}

.clear-all {
    display: inline-flex;
    align-items: center;
    color: #ff4d4f;
    font-size: 22rpx;
    margin-left: 10rpx;
    cursor: pointer;
    padding: 8rpx 10rpx;
    background-color: #fff1f0;
    border: 1rpx solid #ffa39e;
    border-radius: 6rpx;
}

.drawer-container {
    padding: 20rpx;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20rpx;
    padding: 10rpx;
}

.drawer-title {
    font-size: 28rpx;
    font-weight: bold;
}

.drawer-close {
    cursor: pointer;
    padding: 10rpx;
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 10rpx;
}

.filter-section {
    margin-bottom: 20rpx;
}

.filter-title {
    font-size: 28rpx;
    font-weight: bold;
    margin-bottom: 10rpx;
}

.filter-item {
    margin-bottom: 20rpx;
}

.filter-label {
    font-size: 24rpx;
    color: #666;
    margin-bottom: 5rpx;
}

.price-range {
    display: flex;
    align-items: center;
}

.price-divider {
    margin: 0 10rpx;
}

.drawer-footer {
	display: flex;
    justify-content: space-between;
    margin-top: 20rpx;
    padding: 10rpx;
}

.drawer-footer .u-button {
    margin: 0 10rpx;
}
</style>